package be.ipl.finito.daoimpl;

import javax.ejb.Stateless;

import be.ipl.finito.dao.CaseDao;
import be.ipl.finito.domaine.Case;

@SuppressWarnings("serial")
@Stateless
public class CaseDaoImpl extends DaoImpl<Integer, Case> implements CaseDao {

	@Override
	public Case rechercherCase(int idPlateau, int valJeton) {
		String queryString = "select DISTINCT(c) from Plateau p, IN (p.cases) c, IN (c.jeton) j  WHERE j.valeur = ?2 AND p.id = ?1";
		return recherche(queryString, idPlateau, valJeton);
	}
}
